﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace BluSteamClient.View
{
    class StartTab: TabItem
    {
        private CustomHeader customTabHeader = new CustomHeader(); // Create an instance of the usercontrol

        public StartTab(string tabHeading, TabControl ChatTabControl)
        {
            this.Header = customTabHeader; // Assign the usercontrol to the tab header
            Canvas ChatCanvas = new Canvas();
            this.AddChild(ChatCanvas);
            (((CustomHeader)this.Header).FindName("label_TabTitle") as Label).Content = tabHeading;
            this.Height = (((CustomHeader)this.Header).FindName("label_TabTitle") as Label).Height;


            Label ChatLabel = new Label();
            ChatLabel.Content = "- Welcome to Blu Steam Chat! -";
            ChatLabel.FontSize = 13;
            ChatCanvas.Children.Add(ChatLabel);
            Canvas.SetTop(ChatLabel, 0);

            TextBlock InfoTextBlock = new TextBlock();
            InfoTextBlock.Text = "To get started choose a name from the chat list to the right and 'right-click' their name, then select start conversation.";
            InfoTextBlock.Width = 260;
            InfoTextBlock.TextWrapping = TextWrapping.Wrap;
            ChatCanvas.Children.Add(InfoTextBlock);
            Canvas.SetTop(InfoTextBlock, 40);
            Canvas.SetLeft(InfoTextBlock, 10);

            Image img = new Image();
            //img.Source = new BitmapImage(new Uri(@"C:\Documents and Settings\jc222776\My Documents\BluSteam\blu-steam\ClientWPF\Images\BluSteamChat_Logo.png"));
            ChatCanvas.Children.Add(img);
            Canvas.SetTop(img, 140);
            Canvas.SetRight(img, 0);

            this.IsSelected = true;
            

        }


    }
}
